From: Jesús Martínez Novo Date: Tue, 1 Aug 2017 17:55:11 +0000 (+0200) Subject: Fix overzealous addQuotes for rc_source field in rebuildrecentchanges.php X-Git-Tag: 1.31.0-rc.0~2489 X-Git-Url: http://git.cyclocoop.org/%7D%7Cconcat%7B?a=commitdiff_plain;h=c9cc6a299b7dbbabf3afd54bf816754298f7b282;p=lhc%2Fweb%2Fwiklou.git Fix overzealous addQuotes for rc_source field in rebuildrecentchanges.php Those quotes aren't needed since those constants are being used as an array value and the database methods already quotes them. It caused the field to be double-quoted and being inserted with quotes on the database. Bug: T172205 Change-Id: I050f8d477600ee44794b7525a119b3d4451e5a28 --- diff --git a/maintenance/rebuildrecentchanges.php b/maintenance/rebuildrecentchanges.php index 142a4e5f2f..5df432eb7a 100644 --- a/maintenance/rebuildrecentchanges.php +++ b/maintenance/rebuildrecentchanges.php @@ -156,9 +156,7 @@ class RebuildRecentchanges extends Maintenance { 'rc_this_oldid' => $row->rev_id, 'rc_last_oldid' => 0, // is this ok? 'rc_type' => $row->page_is_new ? RC_NEW : RC_EDIT, - 'rc_source' => $row->page_is_new - ? $dbw->addQuotes( RecentChange::SRC_NEW ) - : $dbw->addQuotes( RecentChange::SRC_EDIT ) + 'rc_source' => $row->page_is_new ? RecentChange::SRC_NEW : RecentChange::SRC_EDIT , 'rc_deleted' => $row->rev_deleted ], @@ -239,9 +237,7 @@ class RebuildRecentchanges extends Maintenance { 'rc_last_oldid' => $lastOldId, 'rc_new' => $new, 'rc_type' => $new ? RC_NEW : RC_EDIT, - 'rc_source' => $new === 1 - ? $dbw->addQuotes( RecentChange::SRC_NEW ) - : $dbw->addQuotes( RecentChange::SRC_EDIT ), + 'rc_source' => $new === 1 ? RecentChange::SRC_NEW : RecentChange::SRC_EDIT, 'rc_old_len' => $lastSize, 'rc_new_len' => $size, ], @@ -325,7 +321,7 @@ class RebuildRecentchanges extends Maintenance { 'rc_this_oldid' => 0, 'rc_last_oldid' => 0, 'rc_type' => RC_LOG, - 'rc_source' => $dbw->addQuotes( RecentChange::SRC_LOG ), + 'rc_source' => RecentChange::SRC_LOG, 'rc_cur_id' => $field->isNullable() ? $row->page_id : (int)$row->page_id, // NULL => 0,